element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum please i need some help, i have a project but not sure how to ,,,
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 15 replies
  • Subscribers 667 subscribers
  • Views 1349 views
  • Users 0 members are here
  • raspberry_pi
Related

please i need some help, i have a project but not sure how to ,,,

hannah_girl
hannah_girl over 5 years ago

hi all, my name is Hannah, i have built a car into a mini caravan, the car used to be a 2004 Citroen C5 estate, it has hydro suspension, which is electronic, i have manage to bypass the ecu which controls the hydro pump and fitted a remote switch, which you can raise or lower the car, that side of the project is fully working, but this is where i need some help,

 

the car has a height sensor which sense if the car is too high or too low etc, i wondered if i can use my Raspberry pi B to raise or lower the suspension when the car moves about,

i have tested the sensor which runs of a 5v power supply when the car is lower the output signal is 0.3v, and when its on high its about 4.3v. for normal height its about 2.3v

i am great at wiring, but a tad rusty to when it comes to software and programming, if anyone could point me in the right direction, i would be totally grateful,

if you would like more info on the c5 caravan project, please check out this video on you-tube,  https://youtu.be/crk6tFNhkYQ

thank you for your time, Hannah

  • Sign in to reply
  • Cancel
  • balearicdynamics
    balearicdynamics over 5 years ago

    Hello Hannah, great job!

     

    As far as I saw in your video, if you can control the suspension with a couple of buttons you can control them with a Raspberry Pi too, based on some kind of sensor feedback. Now, the next step is to explain better what should the system do, the logic I mean, then we can think about how to solve the problem.

     

    Enrico

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • hannah_girl
    hannah_girl over 5 years ago in reply to balearicdynamics

    hi Enrico, ok well this is what the car used to do,  if you put some weight in the back, the car would sink a few cm, after 10seconds the hydro pump would then run and make the car go back to normal height,

    if you then took the weight out, the car would then be too high, after 10 seconds the hydro pump would then lower the car to its normal height,

    the sensor has a full range of 0.3v to 4.4v, i am in the process of doing a video of the height sensor and upload it to you-tube,

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • balearicdynamics
    balearicdynamics over 5 years ago in reply to hannah_girl

    It seems you have already reached the point, check the sensor data. Well, if it should have a simple logic, I think it is sufficient an Arduino instead if you want to have more complex behavior (I personally prefer) and more freedom for now and then, the base of the control system should be the Raspberry Pi. Consider that your sensor has an analog output (as far as I know, you say that it is a voltage range variation). So in this case, in my opinion, the best solution is an Arduino in conjunction with the Raspberry Pi. Arduino should read the analog value (it has six analog inputs) acting as a comparator converting the voltage to the height. Then it should pass the data changes to the Raspberry Pi that process and act consequently accordingly with the logic and eventually other environmental parameters (speed, vehicle inclination etc.)

    To communicate between Arduino and Raspberry Pi, you have the possibility to use the USB to serial connection (you can program the Arduino with the Raspberry Pi in the same way too), I2C protocol, SPI.

     

    Enrico

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • hannah_girl
    hannah_girl over 5 years ago in reply to balearicdynamics

    yes you are right, its an analog signal, if you can give me 1 hour or so, i will quickly edit the video and upload it to you tube, and you can see for yourself how the sensor works,

    i didnt know you could link the arduino to the raspberry, see i did say i am abit rusty with this sort of thing

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • luislabmo
    luislabmo over 5 years ago

    Hello Hannah,

     

    Any particular reason why you are planning to use a Raspberry Pi?, usually a RPi is overkill for simple tasks and this sounds like one. From the little information we got maybe you can accomplish what you need with a cheap Arduino or even simpler micro-controllers like the ATtinys.

     

    Another important thing to know is what kind of output is needed from the sensor (is it analog or PWM -it sounds analog to me) considering that a RPi doesn't have analog outputs (you will need a DAC) or if the output is PWM, the RPi handles the PWM by software (which may be an issue as software in RPi is asynchronous) as far as I know.

     

    Finally if you will definitely need a RPi for this, a simple Python script will probably be handy for your needs.

     

    Luis

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • balearicdynamics
    balearicdynamics over 5 years ago in reply to luislabmo

    Luis, if you read the previous posts between Hannah and me, and take a look at the video, the sensor sends analog values, so the Pi does not need to generate any kind of analog data but Hannah should collect analog variations (as I suggested Arduino is perfect). Then to connect the Pi to Arduino is one of the easier things you can do, as I mentioned, USB to Serial (as programming Arduino), /tty/AMA0 (Raspberry Pi serial TTL on the GPIO), I2C protocol, SPI and more.

     

    Enrico

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • hannah_girl
    hannah_girl over 5 years ago in reply to balearicdynamics

    hi Enrico, i have now finished up loading the video, please check this out https://youtu.be/qP37BfSTOts

    i hope this helps,

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • hannah_girl
    hannah_girl over 5 years ago in reply to luislabmo

    the reason why i was thinking of a Raspberry pi is that i got 2 sitting in my draw doing nothing so didnt know if i could use them in my project,

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • luislabmo
    luislabmo over 5 years ago in reply to hannah_girl

    Gotcha!.

     

    Like Enrico said, you can use a RPi but you will need something in the middle as the RPi is not capable of analog (you will need to add a DAC or an Arduino that does the analog part for you). When coding in the RPi, the easiest I can think of is with Python which is already installed in Raspbian if you decide to go with this SO.

     

    Luis

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • hannah_girl
    hannah_girl over 5 years ago in reply to luislabmo

    ok that makes sense, so which arduino would you recommend? i just had a look in my draw and i found a 2 relay module which i can use between the rpi and the hydro pump, thank again hunnie ,

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube