Use neural sensors to build smart sensor systems using microcontrollers

Neural networks are wide topic. But this small example demonstrates how to create basic neural sensor which takes resistive readings from multiply sensors and multiply it by wight factor and then sum the results. Results are compared to three level threshold. Without going too deep in to neural networks we can say, that neural cell thresholds are similar to natural biological neurons. For instance pain levels: itch is low level of pain while burning sensations is combined of ice cold and warm sensations. Neural sensors can operate in the same way.

neuron_sensor.PNG

Lets take typical neural sensors which consists of two inputs with some weights and three outputs. Depending on threshold level that sum of inputs gives – we have and output signal on one of three outputs.

Lets build real world neuron with two inputs and three outputs. As sensor I will use potentiometers which can be replaced by photocells or temperature sensors. According to these two sensor readings neuron can have three states:

  • low
  • medium
  • high

this could be like low light, medium light and high light, o low temp and so on. If you will decide to put neuron to your robot, this could be used for solar cell charging like if its is dark, go to sleep mode, if it is medium light go to brightest area, if it is high light level, stop and start charging.

Each decision is indicated by one of three LEDs.

neuron_schematic

Above schematic is simple neuron sensor simulator made of Atmega8 MCU couple potentiometers and three LEDs. Lets write simple routine to simulate this embedded neuron. For simulation I used VMLAB simulator.

neuron_atmega8.PNG

In the example you may see that one input has weight of 2 and second of 3 units. The exit selected by comparing w value with thresholds.

Simulation results are here:

neuron_animation.gif

This way using simple neural nets you can build more complex and more smart systems.

Download VMLAB neuron demo project .

Blogsphere: TechnoratiFeedsterBloglines
Bookmark: Del.icio.usSpurlFurlSimpyBlinkDigg
RSS feed for comments on this post
 |  TrackBack URI for this post

New on WinAVR Tutorial
Running TX433 and RX433 RF modules with AVR microcontrollers,
Sometimes in embedded design you may want to go wireless. Might be you will want to log various readi …
Programming AVR ADC module with WinAVR,
Most of AVR microcontrollers have Analog to Digital Converter (ADC) integrated in to chip. Such solut …
New on WinARM Tutorial
What are differences between WinARM and WinAVR,
Everyone who is working with AVR microcontrollers knows this powerful tool – WinAVR (http://win …
LPC2000 watchdog timer,
As in all microcontrollers watchdog timers purpose isto reset microcontroller after reasonable amount …

Leave a Reply